import * as types from './mutations-types';

// 更新播放列表（替换）
export const selectPlay = ({ commit }, { list, index }) => {
  commit(types.SET_PLAYLIST, list);
  commit(types.SET_PATTERNLIST, list);
  commit(types.SET_CURRENTINDEX, index);
  commit(types.SET_PLAYING, true);
};
// 设置播放列表
export const setPlayList = ({ commit }, { list }) => {
  commit(types.SET_PLAYLIST, list);
  commit(types.SET_PATTERNLIST, list);
};
